package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.StockMainBoardDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StockMainBoardDetailMapper;
import com.ruoyi.system.service.IStockMainBoardDetailService;
import com.ruoyi.common.core.text.Convert;

/**
 * 股票主板详细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-09
 */
@Service
public class StockMainBoardDetailServiceImpl implements IStockMainBoardDetailService 
{
    @Autowired
    private StockMainBoardDetailMapper stockMainBoardDetailMapper;

    /**
     * 查询股票主板详细
     * 
     * @param detailId 股票主板详细主键
     * @return 股票主板详细
     */
    @Override
    public StockMainBoardDetail selectStockMainBoardDetailByDetailId(Long detailId)
    {
        return stockMainBoardDetailMapper.selectStockMainBoardDetailByDetailId(detailId);
    }

    /**
     * 查询股票主板详细列表
     * 
     * @param stockMainBoardDetail 股票主板详细
     * @return 股票主板详细
     */
    @Override
    public List<StockMainBoardDetail> selectStockMainBoardDetailList(StockMainBoardDetail stockMainBoardDetail)
    {
        return stockMainBoardDetailMapper.selectStockMainBoardDetailList(stockMainBoardDetail);
    }

    /**
     * 新增股票主板详细
     * 
     * @param stockMainBoardDetail 股票主板详细
     * @return 结果
     */
    @Override
    public int insertStockMainBoardDetail(StockMainBoardDetail stockMainBoardDetail)
    {
        stockMainBoardDetail.setCreateTime(DateUtils.getNowDate());
        return stockMainBoardDetailMapper.insertStockMainBoardDetail(stockMainBoardDetail);
    }

    /**
     * 修改股票主板详细
     * 
     * @param stockMainBoardDetail 股票主板详细
     * @return 结果
     */
    @Override
    public int updateStockMainBoardDetail(StockMainBoardDetail stockMainBoardDetail)
    {
        stockMainBoardDetail.setUpdateTime(DateUtils.getNowDate());
        return stockMainBoardDetailMapper.updateStockMainBoardDetail(stockMainBoardDetail);
    }

    /**
     * 批量删除股票主板详细
     * 
     * @param detailIds 需要删除的股票主板详细主键
     * @return 结果
     */
    @Override
    public int deleteStockMainBoardDetailByDetailIds(String detailIds)
    {
        return stockMainBoardDetailMapper.deleteStockMainBoardDetailByDetailIds(Convert.toStrArray(detailIds));
    }

    /**
     * 删除股票主板详细信息
     * 
     * @param detailId 股票主板详细主键
     * @return 结果
     */
    @Override
    public int deleteStockMainBoardDetailByDetailId(Long detailId)
    {
        return stockMainBoardDetailMapper.deleteStockMainBoardDetailByDetailId(detailId);
    }
}
